package com.example.mvpdemo;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.example.mvpdemo.simple1.Simple1Activity;
import com.example.mvpdemo.simple2.Simple2Activity;
import com.example.mvpdemo.simple3.Simple3Activity;
import com.example.mvpdemo.simple4.Simple4Activity;
import com.example.mvpdemo.simple5.Simple5Activity;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        findViewById(R.id.tosimple1_tv).setOnClickListener(this);
        findViewById(R.id.tosimple2_tv).setOnClickListener(this);
        findViewById(R.id.tosimple3_tv).setOnClickListener(this);
        findViewById(R.id.tosimple4_tv).setOnClickListener(this);
        findViewById(R.id.tosimple5_tv).setOnClickListener(this);

    }


    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.tosimple1_tv:
                startActivity(new Intent(MainActivity.this, Simple1Activity.class));
                break;
            case R.id.tosimple2_tv:
                startActivity(new Intent(MainActivity.this, Simple2Activity.class));
                break;
            case R.id.tosimple3_tv:
                startActivity(new Intent(MainActivity.this, Simple3Activity.class));
                break;
            case R.id.tosimple4_tv:
                startActivity(new Intent(MainActivity.this, Simple4Activity.class));
                break;
            case R.id.tosimple5_tv:
                startActivity(new Intent(MainActivity.this, Simple5Activity.class));
                break;
        }
    }
}